/*
 * @Author: xiaosihan
 * @Date: 2025-08-24 10:00:00
 * @Last Modified by: xiaosihan
 * @Last Modified time: 2025-08-24 10:00:00
 */

.container {
  min-height: 100vh;
  background-color: #f5f5f5;
}

.content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.title {
  color: #333;
  margin-bottom: 30px;
  font-size: 28px;
  text-align: center;
}

.error {
  background-color: #fde2e2;
  color: #d32f2f;
  padding: 12px 16px;
  border-radius: 4px;
  margin-bottom: 20px;
  border: 1px solid #fbc4c4;
}

.permissionNote {
  background-color: #e6f7ff;
  color: #1890ff;
  padding: 12px 16px;
  border-radius: 4px;
  margin: 10px 0 20px 0;
  border: 1px solid #91d5ff;
  font-size: 14px;
  line-height: 1.6;
}

.schedulerStatus {
  background-color: #fff;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 30px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.schedulerStatus h2 {
  margin-top: 0;
  margin-bottom: 15px;
  color: #333;
  font-size: 20px;
}

.statusInfo {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.statusBadge {
  padding: 6px 12px;
  border-radius: 16px;
  font-weight: 500;
  font-size: 14px;
}

.statusBadge.enabled {
  background-color: #e8f5e8;
  color: #2e7d32;
  border: 1px solid #c8e6c9;
}

.statusBadge.disabled {
  background-color: #fff3e0;
  color: #f57c00;
  border: 1px solid #ffe0b2;
}

.statusActions {
  display: flex;
  gap: 10px;
}

.eventsSection {
  background-color: #fff;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.sectionHeader {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.sectionHeader h2 {
  margin: 0;
  color: #333;
  font-size: 20px;
}

.loading {
  text-align: center;
  padding: 40px;
  color: #666;
}

.eventsTableContainer {
  overflow-x: auto;
}

.eventsTable {
  width: 100%;
  border-collapse: collapse;
}

.eventsTable th,
.eventsTable td {
  padding: 12px 15px;
  text-align: left;
  border-bottom: 1px solid #e0e0e0;
}

.eventsTable th {
  background-color: #fafafa;
  font-weight: 600;
  color: #333;
  font-size: 14px;
}

.eventsTable td {
  font-size: 14px;
  color: #555;
}

.eventName {
  font-weight: 500;
  color: #333;
}

.emptyRow {
  text-align: center;
  color: #999;
  font-style: italic;
  padding: 40px !important;
}

.actions {
  display: flex;
  gap: 8px;
}

/* 按钮样式 */
.btnPrimary {
  background-color: #1890ff;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.3s;
}

.btnPrimary:hover:not(:disabled) {
  background-color: #40a9ff;
}

.btnPrimary:disabled {
  background-color: #d9d9d9;
  cursor: not-allowed;
}

.btnSecondary {
  background-color: #fff;
  color: #333;
  border: 1px solid #d9d9d9;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.3s;
}

.btnSecondary:hover:not(:disabled) {
  color: #1890ff;
  border-color: #1890ff;
}

.btnSecondary:disabled {
  color: #d9d9d9;
  border-color: #d9d9d9;
  cursor: not-allowed;
}

.btnDanger {
  background-color: #ff4d4f;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.3s;
}

.btnDanger:hover:not(:disabled) {
  background-color: #ff7875;
}

.btnDanger:disabled {
  background-color: #d9d9d9;
  cursor: not-allowed;
}

/* 弹窗样式 */
.modalOverlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal {
  background-color: white;
  border-radius: 8px;
  width: 90%;
  max-width: 600px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.modalHeader {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid #e8e8e8;
}

.modalHeader h2 {
  margin: 0;
  color: #333;
  font-size: 18px;
}

.closeButton {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #999;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.3s;
}

.closeButton:hover {
  background-color: #f5f5f5;
  color: #666;
}

.tabs {
  display: flex;
  border-bottom: 1px solid #e8e8e8;
}

.tabButton {
  flex: 1;
  padding: 12px 20px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 14px;
  color: #666;
  transition: all 0.3s;
  border-bottom: 2px solid transparent;
}

.tabButton.active {
  color: #1890ff;
  border-bottom-color: #1890ff;
}

.tabButton:hover:not(.active) {
  color: #1890ff;
  background-color: #f5f5f5;
}

.formContent {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}

.formGroup {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.formItem {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.formItem label {
  font-weight: 500;
  color: #333;
  font-size: 14px;
}

.formItem input,
.formItem textarea,
.formItem select {
  padding: 8px 12px;
  border: 1px solid #d9d9d9;
  border-radius: 4px;
  font-size: 14px;
  transition: all 0.3s;
}

.formItem input:focus,
.formItem textarea:focus,
.formItem select:focus {
  outline: none;
  border-color: #40a9ff;
  box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
}

.formItem textarea {
  resize: vertical;
  min-height: 80px;
}

.formRow {
  display: flex;
  gap: 16px;
}

.formItemHalf {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.formItemHalf label {
  font-weight: 500;
  color: #333;
  font-size: 14px;
}

.formItemHalf input,
.formItemHalf select {
  padding: 8px 12px;
  border: 1px solid #d9d9d9;
  border-radius: 4px;
  font-size: 14px;
  transition: all 0.3s;
}

.formItemHalf input:focus,
.formItemHalf select:focus {
  outline: none;
  border-color: #40a9ff;
  box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
}

.modalFooter {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 16px 20px;
  border-top: 1px solid #e8e8e8;
  background-color: #fafafa;
  border-bottom-left-radius: 8px;
  border-bottom-right-radius: 8px;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .content {
    padding: 10px;
  }
  
  .title {
    font-size: 24px;
  }
  
  .statusInfo {
    flex-direction: column;
    gap: 15px;
    align-items: flex-start;
  }
  
  .sectionHeader {
    flex-direction: column;
    gap: 15px;
    align-items: flex-start;
  }
  
  .eventsTable th,
  .eventsTable td {
    padding: 8px 10px;
    font-size: 12px;
  }
  
  .actions {
    flex-direction: column;
    gap: 4px;
  }
  
  .btnPrimary,
  .btnSecondary,
  .btnDanger {
    padding: 6px 12px;
    font-size: 12px;
  }
  
  .formRow {
    flex-direction: column;
  }
  
  .modal {
    width: 95%;
    margin: 20px;
  }
}